/* 留言板头部样式 */
.message-header {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    margin-bottom: 2rem;
}

.message-header h1 {
    font-size: 2.5rem;
    color: #343a40;
    margin-bottom: 1rem;
}

.message-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* 留言容器样式 */
.message-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

/* 留言表单样式 */
.message-form {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-form h2 {
    color: #343a40;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background: #0056b3;
}

/* 留言列表样式 */
.message-list {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-list h2 {
    color: #343a40;
    margin-bottom: 1.5rem;
}

.message-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-item {
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.message-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.user-info h3 {
    margin: 0;
    color: #343a40;
    font-size: 1.1rem;
}

.time {
    color: #6c757d;
    font-size: 0.9rem;
}

.message-content {
    text-align: left;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
    padding: 0;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover {
    background: #e9ecef;
}

.page-number {
    color: #495057;
    font-weight: 600;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .message-container {
        grid-template-columns: 1fr;
    }

    .message-header {
        padding: 2rem 1rem;
    }

    .message-header h1 {
        font-size: 2rem;
    }
}

/* 添加/修改点赞和回复按钮样式 */
.message-actions {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
}

.reply-btn,
.like-btn {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.reply-btn:hover,
.like-btn:hover {
    background: #f8f9fa;
    color: #007bff;
}

.like-btn.liked {
    color: #dc3545;
}

/* 修改回复表单样式 */
.reply-form {
    margin-top: 1rem;
    padding: 1rem 1rem 1rem 3rem;
    border-left: 2px solid #e9ecef;
}

/* 修改回复容器样式 */
.message-reply {
    margin-top: 1rem;
    padding-left: 3rem;
    border-left: 2px solid #e9ecef;
}

.reply-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.reply-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.reply-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.reply-user-info h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #343a40;
}

.reply-to {
    font-size: 0.85rem;
    color: #6c757d;
}

.reply-name {
    color: var(--primary-color, #4a90e2);
}

.reply-content {
    color: #495057;
    line-height: 1.6;
    padding-left: calc(32px + 1rem);
    margin-bottom: 0.5rem;
}

/* 回复中的操作按钮 */
.reply-actions {
    padding-left: calc(32px + 1rem);
}

.message-reply .reply-btn {
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
}

/* 修改回复表单按钮样式 */
.submit-reply,
.cancel-reply {
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.submit-reply {
    background: var(--primary-color, #4a90e2);
    color: #fff;
    border: none;
}

.submit-reply:hover {
    background: var(--primary-dark, #357abd);
}

.cancel-reply {
    background: transparent;
    color: #666;
    border: none;
}

.cancel-reply:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.message-reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.message-reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color, #4a90e2);
} 